##############################################################
## MOD Title: Change Math Question and Answer During Registration...
## MOD Author: Nightrider < N/A > (N/A) 
## MOD Description: This will allow you to quickly change the 
## 	   				registration security question and answer in the ACP...
## MOD Version: 1.0.0
##
## Installation Level: easy - Please Use EasyMOD to save us all a lot of unnecessary grief
## Installation Time: 1 Minute
## Files To Edit: 5
##				  admin/admin_board.php
## 		 		  includes/usercp_register.php
## 		 		  language/lang_english/lang_admin.php
##				  templates/subSilver/profile_add_body.tpl
##				  templates/subSilver/admin/board_config_body.tpl
##
## Included Files: 0
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: The Math Question During Registration MOD by thesamet
## 		  		 MUST BE installed before you can use this MOD to  
##				 change the question and answer...
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
## MOD History: 
## 
##    Sept 10, 2012
## 
############################################################## 
#
#-----[ DIY INSTRUCTIONS ]---------------------------------------------
#
You should do a test registration each time you modify the question and answer
to make sure that new members can still successfully register...

#
#-----[ SQL ]---------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('security_question', 'Type in or copy and paste the following word using lower case font:  nospam *');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('security_answer', 'nospam');
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]---------------------------------------------
#
$new['sitename']
#
#-----[ AFTER, ADD ]---------------------------------------------
#

$new['security_question'] = str_replace('"', '&quot;', strip_tags($new['security_question']));
$new['security_answer'] = str_replace('"', '&quot;', strip_tags($new['security_answer']));
#
#-----[ FIND ]---------------------------------------------
#
"L_ACCT_ACTIVATION" =>
#
#-----[ AFTER, ADD ]---------------------------------------------
#

	"L_SECURITY_QUESTION" => $lang['security_question'], 
	"L_SECURITY_ANSWER" => $lang['security_answer'], 
	"L_SECURITY_QUESTION_EXPLAIN" => $lang['security_question_explain'],
	"L_SECURITY_ANSWER_EXPLAIN" => $lang['security_answer_explain'], 
#
#-----[ FIND ]---------------------------------------------
#
"SITENAME" =>
#
#-----[ AFTER, ADD ]---------------------------------------------
#

	"SECURITY_QUESTION" => $new['security_question'],
	"SECURITY_ANSWER" => $new['security_answer'],
#
#-----[ OPEN ]---------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]---------------------------------------------
#
else if ( $mode == 'register' )
{
#
#-----[ AFTER, ADD ]---------------------------------------------
#
        if (!isset($_POST['math_question']) || $_POST['math_question'] != $board_config['security_answer']) {
            $error = TRUE;
            $error_msg .= (isset($error_msg) ? '<br/>' : '') . "Incorrect answer to the security field.  User lower case font when entering this answer......";
        }
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]---------------------------------------------
#
?>		
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
$lang['security_question'] = 'Security Question';
$lang['security_answer'] = 'Security Answer'; 
$lang['security_question_explain'] = 'Enter a question that will be displayed during the Registration process';
$lang['security_answer_explain'] = 'Enter an answer that the new members MUST answer correctly during the Registration process'; 

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
<!-- END switch_confirm -->
#
#-----[ AFTER, ADD ]---------------------------------------
#
	<tr>
       <td class="row1"><span class="gen">{SECURITY_QUESTION}</span></td>
       <td class="row2">
	      <input type="text" class="post" style="width: 200px" name="math_question" size="6" maxlength="30" value="" />
       </td>
	</tr>
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
{CONFIRM_ENABLE}
#
#-----[ FIND ]---------------------------------------------
#
</tr>
#
#-----[ AFTER, ADD ]---------------------------------------------
#
	<tr>
		<td class="row1">{L_SECURITY_QUESTION}<br /><span class="gensmall">{L_SECURITY_QUESTION_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="security_question" value="{SECURITY_QUESTION}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_SECURITY_ANSWER}<br /><span class="gensmall">{L_SECURITY_ANSWER_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="10" maxlength="30" name="security_answer" value="{SECURITY_ANSWER}" /></td>
	</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM